package com.web.service.impl;

import com.web.mapper.MessageMapper;
import com.web.service.MessageWall;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
public class MessageWallService implements MessageWall {
    @Autowired
    private MessageMapper messageMapper;

    @PostConstruct
    public void init() {
        System.out.println("MessageWallService：创建对象成功！");
    }

    public List<com.web.pojo.MessageWall> findAllMessage() {
        return messageMapper.findAllMessage();
    }

    public int InsertMessage(com.web.pojo.MessageWall messageWall) {
        return messageMapper.InsertMessage(messageWall);
    }

    public int DeleteMessage(int id) {
        return messageMapper.DeleteMessage(id);
    }
}
